/*
 * @Author: zhuxiaoyi
 * @Date: 2024-01-26 11:27:49
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2024-08-26 16:57:44
 * @Description:
 */
import {
    Entity,
    Column,
    PrimaryColumn,
    CreateDateColumn,
    UpdateDateColumn,
    ManyToOne,
    JoinColumn,
    OneToOne,
} from 'typeorm';

@Entity('tb_simulation_task')
export class SimulationTask {
    @PrimaryColumn()
    id: string;
1
    @Column() // 1，定时任务   2，人工出触发任务
    taskType: string;

    @Column() //任务编号  
    taskId: string

    @Column({ nullable: true })   // 街道、区县、市、省、自定义
    locationGranularity: number;

    @Column({ nullable: true }) //模拟结果的生成时间
    resultTimestamp: Date;

    @Column() //预测的时间范围（未来几小时）
    forecastRange: number;

    @Column({ nullable: true }) //降雨信息
    rainfallInfo: string;

    @Column({ nullable: true }) //模拟结果
    simulationResult: string;

    @Column() //处理状态
    processingStatus: string;

    @Column() //开始时间
    startTime: Date;

    @Column() //结束时间
    endTime: Date;

    @CreateDateColumn()  //创建时间
    createDate: Date;

    @UpdateDateColumn() //更新时间
    updateDate: Date;

    @Column({ nullable: true }) //日志
    log:string ;

}
